# 类
class Person():
    def __init__(self, name):
        self.name = name

    def point(self):
        print(self.name)


class Student(Person):

    # 初始化方法，构造函数
    # self 关键字 等同于 Java中的this，表示对象本身
    # 构造方法只能有一个
    def __init__(self, id, name, age):
        super().__init__(name)
        # 定义“即” 赋值（初始化）
        self.clazz = "第九期"
        self.__id = id
        self.age = age

    def point(self):
        print(self.name, self.age, self.__id, self.clazz)


class Teacher(Person):
    def __init__(self, name):
        super().__init__(name)

    def point(self):
        print("老师类", self.name)


# 不需要使用new关键字
stu1 = Student("00001", "zhangSan", "22")
stu2 = Student("00002", "liSi", "20")
t1 = Teacher("miss Li")
stu1.point()
stu2.point()
t1.point()
print(stu1._Student__id)
